<%@page import="temp.InfoObj"%>
<%@page import="java.util.ArrayList"%>
<%@page import="temp.ParseXml"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.LinkedList"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%
	String str = "";
	String param = request.getParameter("str");

	if(param != null){
		str = param;
		str = new String(str.getBytes("8859_1"),"utf-8");
	}
	
	ParseXml parseXml = new ParseXml();


	String url = "http://apis.daum.net/local/geo/addr2coord?apikey=1a721b9f9b1b04356b27f476ba02c3900a85d308&q="+str+"&output=xml";
	ArrayList<InfoObj> infoArr =  parseXml.authLoaderHdr(url);
	System.out.println("jsp:"+infoArr.size());
%>
<%
    for(int i = 0; i < infoArr.size(); i++){%>
    	<a href = "javascript:movingResult('<%=infoArr.get(i).getLat()%>','<%=infoArr.get(i).getLng()%>','<%=infoArr.get(i).getTitle()%>')">
    	   <%=infoArr.get(i).getLocalName_1()+infoArr.get(i).getLocalName_2()+infoArr.get(i).getLocalName_3()+infoArr.get(i).getNewAddress() %>
    	</a><br />
<%
    }
%>